using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using TVDesigner.Entities.Elements;

namespace TVDesigner.GUI.Elements
{
    public partial class ScreenResizeElement : TVDesigner.GUI.Elements.Element
    {
        private static int sceenResizeCount = 0;

        public ScreenResizeElement()
            : this(null)
        {
        }

        public ScreenResizeElement(ScreenResize screenResize)
        {
            InitializeComponent();
            AddEvents(_PictureBox);

            if (screenResize != null)
            {
                _LogicElement = screenResize;
                this.Name = screenResize.Name;
                this.Size = screenResize.Size;
                this.Location = screenResize.Location;
            }
            else {
                _LogicElement = new ScreenResize();
                _LogicElement.Size = this.Size;
                this.Name = "screen" + sceenResizeCount++;
                _LogicElement.Name = this.Name;
                _LogicElement.Location = this.Location;
            }
        }
    }
}

